CONTENTS | INDEX | PREV | NEXT
sin
fsin
NAME
sin - return sine of a double quantity
fsin - return sine of a float quantity
SYNOPSIS
#include <math.h>
double a = sin(b);
double b;
float c = fsin(d);
float d;
FUNCTION
Returns the sine of a floating point quantity
EXAMPLE
/*
* compile with the math library -lm
*/
#include <math.h>
#include <stdio.h>
main()
{
{
double a = sin(0.25);
printf("sin 0.25 = %lfn", a); /* 0.2474 */
}
{ /* less accuracy */
float a = fsin(0.25);
printf("sin 0.25 = %lfn", (double)a);
}
return(0);
}
INPUTS
double b; double floating point value
float d; float floating point value
RESULTS
double a; result double floating point value
float c; result float floating point value